package com.teatang.tadmin.core.page;

import com.teatang.tadmin.util.ServletUtils;

/**
 * 表格数据处理
 */
public class TableSupport {
    /**
     * 封装分页对象
     */
    public static PageDomain getPageDomain() {
        PageDomain pageDomain = new PageDomain();
        pageDomain.setPageNum(ServletUtils.getParameterToInt("page", 1));
        pageDomain.setPageSize(ServletUtils.getParameterToInt("limit", 20));
        pageDomain.setOrderByColumn(ServletUtils.getParameter("order_by_column", "id"));
        pageDomain.setOrderBy(ServletUtils.getParameter("order_by", "desc"));
        return pageDomain;
    }
}
